﻿@model SuperiorModel.ShopAppModel
@{
    ViewBag.Title = "会员中心";
    Layout = "~/Views/Shared/_Layout.cshtml";
    var spid = Request["spid"];
    var said = Request["said"];
    var countModel = ViewBag.CountModel;
         var cartCount = ViewHelper.CartCount();
}

<div class='weui-content' style="padding-top: 0px;">
    <div class="wy-center-top">
        <a href="javascript:;">
            <div class="weui-media-box weui-media-box_appmsg">
                <div class="weui-media-box__hd"><img class="weui-media-box__thumb radius" src="@UserContext.User.HeadImgUrl" alt=""></div>
                <div class="weui-media-box__bd">
                    <h4 class="weui-media-box__title user-name">@UserContext.User.NickName</h4>
                    <p class="user-grade">注册时间:@(UserContext.User.CreateTime)</p>
                    
                </div>

            </div>
        </a>
        
    </div>
    <div class="weui-panel weui-panel_access">

        <div class="weui-panel__bd">
            <div class="weui-flex">
                <div class="weui-flex__item">
                    <a href="/Order/MyOrders?orderStatus=0&spid=@spid&said=@said" class="center-ordersModule">
                        <span class="weui-badge" style="position: absolute;top:5px;right:10px; font-size:10px;">@countModel.WaitPayCount</span>
                        <div class="imgicon"><img src="/Content/images/daifukuan.png?v=13" /></div>
                        <div class="name">待付款</div>
                    </a>
                </div>
                <div class="weui-flex__item">
                    <a href="/Order/MyOrders?orderStatus=1&spid=@spid&said=@said" class="center-ordersModule">
                        <span class="weui-badge" style="position: absolute;top:5px;right:10px; font-size:10px;">@countModel.SendCount</span>
                        <div class="imgicon"><img src="/Content/images/yifaahuo.png?v=13" /></div>
                        <div class="name">已发货</div>
                    </a>
                </div>
                <div class="weui-flex__item">
                    <a href="/Order/MyOrders?orderStatus=3&spid=@spid&said=@said" class="center-ordersModule">
                        <span class="weui-badge" style="position: absolute;top:5px;right:10px; font-size:10px;">@countModel.WaitSendCount</span>
                        <div class="imgicon"><img src="/Content/images/daifahuo.png?v=13" /></div>
                        <div class="name">待发货</div>
                    </a>
                </div>
                <div class="weui-flex__item">
                    <a href="/Order/MyOrders?orderStatus=2&spid=@spid&said=@said" class="center-ordersModule">
                        <span class="weui-badge" style="position: absolute;top:5px;right:10px; font-size:10px;">@countModel.FailCount</span>
                        <div class="imgicon"><img src="/Content/images/dingdanshibai.png?v=13" /></div>
                        <div class="name">失败</div>
                    </a>
                </div>
                <div class="weui-flex__item">
                    <a href="/Order/MyOrders?orderStatus=4&spid=@spid&said=@said" class="center-ordersModule">
                        <span class="weui-badge" style="position: absolute;top:5px;right:10px; font-size:10px;">@countModel.ServiceCount</span>
                        <div class="imgicon"><img src="/Content/images/shouhou.png?v=13" /></div>
                        <div class="name">售后</div>
                    </a>
                </div>
            </div>
        </div>
    </div>

    <div class="weui-panel">
        <div class="weui-panel__bd">
            <div class="weui-media-box weui-media-box_small-appmsg">
                <div class="weui-cells">
                    <a class="weui-cell weui-cell_access erqi" href="/Order/MyOrders?orderStatus=999&spid=@spid&said=@said">
                        <div class="weui-cell__hd"><img src="/Content/images/drafts.png" alt="" class="center-list-icon"></div>
                        <div class="weui-cell__bd weui-cell_primary">
                            <p class="center-list-txt">全部订单</p>
                        </div>
                        <span class="weui-cell__ft"></span>
                    </a>
                    <a class="weui-cell weui-cell_access erqi" id="a_tell" href="tel:@Model.ServicePhone">
                        <div class="weui-cell__hd"><img src="/Content/images/call_in.png" alt="" class="center-list-icon"></div>
                        <div class="weui-cell__bd weui-cell_primary">
                            <p class="center-list-txt">客服电话</p>
                        </div>
                        <span class="weui-cell__ft"></span>
                    </a>
                    <a class="weui-cell weui-cell_access erqi" id="a_wx" wx="@Model.ServiceWx" href="javascript:;">
                        <div class="weui-cell__hd"><img src="/Content/images/friends.png" alt="" class="center-list-icon"></div>
                        <div class="weui-cell__bd weui-cell_primary">
                            <p class="center-list-txt">客服微信</p>
                        </div>
                        <span class="weui-cell__ft"></span>
                    </a>
                    <a class="weui-cell weui-cell_access erqi" href="/User/CouponList?spid=@spid&said=@said">
                        <div class="weui-cell__hd"><img src="/Content/images/read_mode.png" alt="" class="center-list-icon"></div>
                        <div class="weui-cell__bd weui-cell_primary">
                            <p class="center-list-txt">优惠券</p>
                        </div>
                        <span class="weui-cell__ft"></span>
                    </a>
                    <a class="weui-cell weui-cell_access erqi" id="a_ts" href="#">
                        <div class="weui-cell__hd"><img src="/Content/images/dial.png" alt="" class="center-list-icon"></div>
                        <div class="weui-cell__bd weui-cell_primary">
                            <p class="center-list-txt">投诉问题</p>
                        </div>
                        <span class="weui-cell__ft"></span>
                    </a>
                 
                  
                </div>
            </div>
        </div>
    </div>


</div>

<!--底部导航-->
<div class="foot-black"></div>
<div class="weui-tabbar wy-foot-menu">
    <a href="/Home/Index?spid=@spid&said=@said" class="weui-tabbar__item ">
        <div class="weui-tabbar__icon foot-menu-home"></div>
        <p class="weui-tabbar__label">首页</p>
    </a>

    <a href="/Product/MenuList?spid=@spid&said=@said" class="weui-tabbar__item">
        <div class="weui-tabbar__icon foot-menu-list"></div>
        <p class="weui-tabbar__label">分类</p>
    </a>
    <a href="/Cart/Index?spid=@spid&said=@said" class="weui-tabbar__item">
        @if (cartCount > 0)
        {
            <span class="weui-badge" style="position: absolute;top: -.4em;right: 1em;">@cartCount</span>
        }
        <div class="weui-tabbar__icon foot-menu-cart"></div>
        <p class="weui-tabbar__label">购物车</p>
    </a>
    <a href="/User/Index?spid=@spid&said=@said" class="weui-tabbar__item weui-bar__item--on">
        <div class="weui-tabbar__icon foot-menu-member"></div>
        <p class="weui-tabbar__label">我的</p>
    </a>
</div>
<script>
    $(document).on('click', '#a_wx', function () {
        var wx = $(this).attr("wx");
        layer.alert(wx);
    })
    $(document).on('click', '#a_ts', function () {
        layer.prompt({ title: '请填写投诉的问题，并确认', formType: 2 }, function (text, index) {
            var index = layer.load(1);
            RequestManager.Ajax.Post("/User/AddQuestion?spid=@spid&said=@said", {
                AppType: 2,
                Question:text
            }, true, function (data) {
                layer.close(index);
                if (data.IsSuccess) {
                    layer.msg('提交成功');
                } else {
                    layer.alert(data.Message);
                }
            })
           
        });
    })
</script>